/** 
 * Description: 退出确认弹窗组件
 * Date: 2025/2/15
 */

<template>
  <div class="exit-confirmation">
    <div class="exit-dialog">
      <div class="button-group">
        <div>
          <button class="cancel-button" @click="handleCancel">
            取消
          </button>
        </div>
        <div>
          <button class="confirm-button" @click="handleConfirm">
            确定
          </button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ExitConfirmation',
  
  methods: {
    handleCancel() {
      this.$emit('cancel')
    },
    
    handleConfirm() {
      this.$emit('confirm')
    }
  }
}
</script>

<style scoped lang="scss">
.exit-confirmation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;

  .exit-dialog {
    width: 700px;
    height: 384px;
    background: url('@/image/exit.png') no-repeat;
    background-size: 100% 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;

    .button-group {
      display: flex;
      justify-content: center;
      margin-top: 90px;
      
      .cancel-button {
        padding: 8px 80px;
        min-width: 200px;
        font-size: 18px;
        color: #ffffff;
        background-color: transparent;
        border: 2px solid #4e9089;
        border-radius: 50px;
        cursor: pointer;
        transition: all 0.3s;

        &:hover {
          background-color: rgba(78, 144, 137, 0.1);
        }

        &:active {
          background-color: rgba(78, 144, 137, 0.2);
        }
      }

      .confirm-button {
        padding: 8px 80px;
        min-width: 200px;
        font-size: 18px;
        color: #51f08d;
        background-color: #1e7168;
        border: none;
        border-radius: 50px;
        cursor: pointer;
        transition: all 0.3s;
        margin-left: 20px;

        &:hover {
          background-color: #1a635b;
        }

        &:active {
          background-color: #165951;
        }
      }
    }
  }
}
</style> 